//
//  SERegistrationDoctorDateCell.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/4/21.
//

import UIKit

class SERegistrationDoctorDateCell: UITableViewCell {

    static let className = "SERegistrationDoctorDateCell"
    static let reuseId = className

    @IBOutlet weak var dateView: SERegistrationDoctorDateView!

    var indexPath = IndexPath(row: 0, section: 0)
    weak var dateViewDelegate: SERegistrationDoctorDateViewDelegate?

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    func updateCell(model: SERegistrationDoctorShift) {
        dateView.updateView(model: model)
        dateView.delegate = self
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}

extension SERegistrationDoctorDateCell: SERegistrationDoctorDateViewDelegate {
    func registrationDoctorDateViewBtnAction(model: SERegistrationDoctorShift) {
        dateViewDelegate?.registrationDoctorDateViewBtnAction(model: model)
    }
}
